home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl70b2.lha / tcl7.0b2 / doc / CallDel.3 < prev    next >
Text File  |  1993-06-16  |  3KB  |  74 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/tcl/man/RCS/CallDel.3,v 1.1 93/06/16 15:09:38 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tcl_CallWhenDeleted tclc 7.0
  25. .BS
  26. .SH NAME
  27. .na
  28. Tcl_CallWhenDeleted \- Arrange for callback when interpreter is deleted
  29. .ad
  30. .SH SYNOPSIS
  31. .nf
  32. \fB#include <tcl.h>\fR
  33. .sp
  34. \fBTcl_CallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
  35. .SH ARGUMENTS
  36. .AS Tcl_InterpDeleteProc clientData
  37. .AP Tcl_Interp *interp in
  38. Interpreter with which to associated callback.
  39. .AP Tcl_InterpDeleteProc *proc in
  40. Procedure to call when \fIinterp\fR is deleted.
  41. .AP ClientData clientData in
  42. Arbitrary one-word value to pass to \fIproc\fR.
  43. .BE
  44.  
  45. .SH DESCRIPTION
  46. .PP
  47.  
  48. \fBTcl_CallWhenDeleted\fR arranges for \fIproc\fR to be called by
  49. \fBTcl_DeleteInterp\fR if/when \fIinterp\fR is deleted at some future
  50. time.  \fIProc\fR will be invoked just before the interpreter
  51. is deleted, but the interpreter will still be valid at the
  52. time of the call.
  53. \fIProc\fR should have arguments and result that match the
  54. type \fBTcl_InterpDeleteProc\fR:
  55. .nf
  56. .RS
  57. typedef int Tcl_CmdProc(
  58. .RS
  59. ClientData \fIclientData\fR,
  60. Tcl_Interp *\fIinterp\fR);
  61. .RE
  62. .RE
  63. .fi
  64. The \fIclientData\fP and \fIinterp\fR parameters are
  65. copies of the \fIclientData\fP and \fIinterp\fR arguments given
  66. to \fBTcl_CallWhenDeleted\fR.
  67. Typically, \fIclientData\fR points to an application-specific
  68. data structure that \fIproc\fR uses to perform cleanup when an
  69. interpreter is about to go away.
  70. \fIProc\fR does not return a value.
  71.  
  72. .SH KEYWORDS
  73. callback, delete, interpreter
  74.